<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>日志统计分析结果</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f8f9fa;
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: center;
            align-items: flex-start;
            height: 100vh;
            overflow: auto;
        }

        .container {
            background-color: #fff;
            padding: 20px;
            margin: 20px;
            border-radius: 8px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            max-width: 800px;
            width: 100%;
            text-align: center;
        }

        h2 {
            color: #333;
            margin-bottom: 20px;
        }

        table {
            width: 100%;
            border-collapse: collapse;
            margin: 20px 0;
        }

        th, td {
            padding: 10px;
            border: 1px solid #ddd;
            text-align: left;
            word-wrap: break-word;
        }

        th {
            background-color: #f2f2f2;
        }

        thead th {
            position: sticky;
            top: 0;
            background-color: #fff;
            z-index: 1;
        }

        tbody {
            max-height: 60vh;
            overflow-y: auto;
        }

        tbody td {
            white-space: pre-wrap;
        }
    </style>
</head>
<body>
    <div class="container">
        <h2>日志统计分析结果</h2>
        
        <table>
            <thead>
                <tr>
                    <th>出现次数</th>
                    <th>内容</th>
                </tr>
            </thead>
            <tbody>
                {% for line in log_entries %}
                <tr>
                    <td>{{ line['count'] }}</td>
                    <td>{{ line['message'] }}</td>
                </tr>
                {% endfor %}
            </tbody>
        </table>
    </div>
</body>
</html>
